#!/usr/bin/python3

# 表名
t_user_info="t_user"
t_customer_info="t_customer"
t_system_list="t_system_list"
t_product_type="t_product_type"
t_product_line="t_product_line"
t_exchange="t_exchange"
t_system_version="t_version_num"
t_log = "t_log"


CustomerType=["期货公司","券商","私募"]
ProductType= ["REM期货","REM股票期权","REM证券期权",
              "EFH期货","EFH证券"]

VeesionType= ["软件版本","硬件版本","驱动版本"]
FPGAType=    ["MG5","DE5","NF5","MG10"]
NetCardType= ["Solarflare", "X10", "X25"]

ExchangeNum= [ ["上交所","100"],["深交所","101"],
               ["上期所","103"],["能源中心","106"],["中金所","102"],["大商所","104"],["郑商所","105"],["金交所","107"]]

ExchangeRoom={"上交所":  ["上证通","龙沪路","华京路"],
              "深交所":  ["南方中心","福田中心"],
              "上期所":  ["张江","农商行"],
              "能源中心":["张江","农商行"],
              "中金所":  ["移动","蓝光","数讯"],
              "大商所":  ["高新一期","高新三期","河口"],
              "郑商所":  [],
              "金交所":  []}






queryAllTableSql = "select * from "

def execDBData(user, dbConnPool, msg="", doSql= ""):
    dbConnPool.exec(doSql)
    loadLogSql = "insert into " + t_log + " (user_name, msg, do_sql) " + " values( " + \
        "'" + user + "','" + msg + "','" + doSql + "')"
    dbConnPool.exec(loadLogSql)